<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>38.3. Zend_Service_Amazon</title>
<link rel="stylesheet" href="dbstyle.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="Programmer's Reference Guide">
<link rel="up" href="zend.service.html" title="Chapter 38. Zend_Service">
<link rel="prev" href="zend.service.akismet.html" title="38.2. Zend_Service_Akismet">
<link rel="next" href="zend.service.audioscrobbler.html" title="38.4. Zend_Service_Audioscrobbler">
<link rel="chapter" href="introduction.html" title="Chapter 1. Introduction to Zend Framework">
<link rel="chapter" href="zend.acl.html" title="Chapter 2. Zend_Acl">
<link rel="chapter" href="zend.auth.html" title="Chapter 3. Zend_Auth">
<link rel="chapter" href="zend.cache.html" title="Chapter 4. Zend_Cache">
<link rel="chapter" href="zend.config.html" title="Chapter 5. Zend_Config">
<link rel="chapter" href="zend.console.getopt.html" title="Chapter 6. Zend_Console_Getopt">
<link rel="chapter" href="zend.controller.html" title="Chapter 7. Zend_Controller">
<link rel="chapter" href="zend.currency.html" title="Chapter 8. Zend_Currency">
<link rel="chapter" href="zend.date.html" title="Chapter 9. Zend_Date">
<link rel="chapter" href="zend.db.html" title="Chapter 10. Zend_Db">
<link rel="chapter" href="zend.debug.html" title="Chapter 11. Zend_Debug">
<link rel="chapter" href="zend.dojo.html" title="Chapter 12. Zend_Dojo">
<link rel="chapter" href="zend.dom.html" title="Chapter 13. Zend_Dom">
<link rel="chapter" href="zend.exception.html" title="Chapter 14. Zend_Exception">
<link rel="chapter" href="zend.feed.html" title="Chapter 15. Zend_Feed">
<link rel="chapter" href="zend.filter.html" title="Chapter 16. Zend_Filter">
<link rel="chapter" href="zend.form.html" title="Chapter 17. Zend_Form">
<link rel="chapter" href="zend.gdata.html" title="Chapter 18. Zend_Gdata">
<link rel="chapter" href="zend.http.html" title="Chapter 19. Zend_Http">
<link rel="chapter" href="zend.infocard.html" title="Chapter 20. Zend_InfoCard">
<link rel="chapter" href="zend.json.html" title="Chapter 21. Zend_Json">
<link rel="chapter" href="zend.layout.html" title="Chapter 22. Zend_Layout">
<link rel="chapter" href="zend.ldap.html" title="Chapter 23. Zend_Ldap">
<link rel="chapter" href="zend.loader.html" title="Chapter 24. Zend_Loader">
<link rel="chapter" href="zend.locale.html" title="Chapter 25. Zend_Locale">
<link rel="chapter" href="zend.log.html" title="Chapter 26. Zend_Log">
<link rel="chapter" href="zend.mail.html" title="Chapter 27. Zend_Mail">
<link rel="chapter" href="zend.measure.html" title="Chapter 28. Zend_Measure">
<link rel="chapter" href="zend.memory.html" title="Chapter 29. Zend_Memory">
<link rel="chapter" href="zend.mime.html" title="Chapter 30. Zend_Mime">
<link rel="chapter" href="zend.openid.html" title="Chapter 31. Zend_OpenId">
<link rel="chapter" href="zend.paginator.html" title="Chapter 32. Zend_Paginator">
<link rel="chapter" href="zend.pdf.html" title="Chapter 33. Zend_Pdf">
<link rel="chapter" href="zend.registry.html" title="Chapter 34. Zend_Registry">
<link rel="chapter" href="zend.rest.html" title="Chapter 35. Zend_Rest">
<link rel="chapter" href="zend.search.lucene.html" title="Chapter 36. Zend_Search_Lucene">
<link rel="chapter" href="zend.server.html" title="Chapter 37. Zend_Server">
<link rel="chapter" href="zend.service.html" title="Chapter 38. Zend_Service">
<link rel="chapter" href="zend.session.html" title="Chapter 39. Zend_Session">
<link rel="chapter" href="zend.soap.html" title="Chapter 40. Zend_Soap">
<link rel="chapter" href="zend.test.html" title="Chapter 41. Zend_Test">
<link rel="chapter" href="zend.text.html" title="Chapter 42. Zend_Text">
<link rel="chapter" href="zend.timesync.html" title="Chapter 43. Zend_TimeSync">
<link rel="chapter" href="zend.translate.html" title="Chapter 44. Zend_Translate">
<link rel="chapter" href="zend.uri.html" title="Chapter 45. Zend_Uri">
<link rel="chapter" href="zend.validate.html" title="Chapter 46. Zend_Validate">
<link rel="chapter" href="zend.version.html" title="Chapter 47. Zend_Version">
<link rel="chapter" href="zend.view.html" title="Chapter 48. Zend_View">
<link rel="chapter" href="zend.xmlrpc.html" title="Chapter 49. Zend_XmlRpc">
<link rel="appendix" href="requirements.html" title="Appendix A. Zend Framework Requirements">
<link rel="appendix" href="coding-standard.html" title="Appendix B. Zend Framework Coding Standard for PHP">
<link rel="appendix" href="copyrights.html" title="Appendix C. Copyright Information">
<link rel="index" href="the.index.html" title="Index">
<link rel="subsection" href="zend.service.amazon.html#zend.service.amazon.introduction" title="38.3.1. Introduction">
<link rel="subsection" href="zend.service.amazon.html#zend.service.amazon.countrycodes" title="38.3.2. Country Codes">
<link rel="subsection" href="zend.service.amazon.html#zend.service.amazon.itemlookup" title="38.3.3. Looking up a Specific Amazon Item by ASIN">
<link rel="subsection" href="zend.service.amazon.html#zend.service.amazon.itemsearch" title="38.3.4. Performing Amazon Item Searches">
<link rel="subsection" href="zend.service.amazon.html#zend.service.amazon.query" title="38.3.5. Using the Alternative Query API">
<link rel="subsection" href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader"><table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">38.3. Zend_Service_Amazon</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="zend.service.akismet.html">Prev</a> </td>
<th width="60%" align="center">Chapter 38. Zend_Service</th>
<td width="20%" align="right"> <a accesskey="n" href="zend.service.audioscrobbler.html">Next</a>
</td>
</tr>
</table></div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="zend.service.amazon"></a>38.3. Zend_Service_Amazon</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.service.amazon.introduction"></a>38.3.1. Introduction</h3></div></div></div>
<p>
            <code class="code">Zend_Service_Amazon</code> is a simple API for using Amazon web services.
            <code class="code">Zend_Service_Amazon</code> has two APIs: a more traditional one that follows Amazon's own API, and a
            simpler "Query API" for constructing even complex search queries easily.
        </p>
<p>
            <code class="code">Zend_Service_Amazon</code> enables developers to retrieve information appearing throughout Amazon.com
            web sites directly through the Amazon Web Services API. Examples include:
            </p>
<div class="itemizedlist"><ul type="disc">
<li><p>
                        Store item information, such as images, descriptions, pricing, and more
                    </p></li>
<li><p>
                        Customer and editorial reviews
                    </p></li>
<li><p>
                        Similar products and accessories
                    </p></li>
<li><p>
                        Amazon.com offers
                    </p></li>
<li><p>
                        ListMania lists
                    </p></li>
</ul></div>
<p>
        </p>
<p>
            In order to use <code class="code">Zend_Service_Amazon</code>, you should already have an Amazon developer API key. To
            get a key and for more information, please visit the
            <a href="http://www.amazon.com/gp/aws/landing.html" target="_top">Amazon Web Services</a> web site.
        </p>
<div class="note"><table border="0" summary="Note: Attention">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
<th align="left">Attention</th>
</tr>
<tr><td align="left" valign="top"><p>
                Your Amazon developer API key is linked to your Amazon identity,
                so take appropriate measures to keep your API key private.
            </p></td></tr>
</table></div>
<div class="example">
<a name="zend.service.amazon.introduction.example.itemsearch"></a><p class="title"><b>Example 38.4. Search Amazon Using the Traditional API</b></p>
<div class="example-contents">
<p>
                In this example, we search for PHP books at Amazon and loop through the results, printing them.
            </p>
<pre class="programlisting">&lt;?php
require_once 'Zend/Service/Amazon.php';
$amazon = new Zend_Service_Amazon('AMAZON_API_KEY');
$results = $amazon-&gt;itemSearch(array('SearchIndex' =&gt; 'Books', 'Keywords' =&gt; 'php'));
foreach ($results as $result) {
    echo $result-&gt;Title . '&lt;br /&gt;';
}
            </pre>
</div>
</div>
<br class="example-break"><div class="example">
<a name="zend.service.amazon.introduction.example.query_api"></a><p class="title"><b>Example 38.5. Search Amazon Using the Query API</b></p>
<div class="example-contents">
<p>
                Here, we also search for PHP books at Amazon, but we instead use the Query API, which
                resembles the Fluent Interface design pattern.
            </p>
<pre class="programlisting">&lt;?php
require_once 'Zend/Service/Amazon/Query.php';
$query = new Zend_Service_Amazon_Query('AMAZON_API_KEY');
$query-&gt;category('Books')-&gt;Keywords('PHP');
$results = $query-&gt;search();
foreach ($results as $result) {
    echo $result-&gt;Title . '&lt;br /&gt;';
}
            </pre>
</div>
</div>
<br class="example-break">
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.service.amazon.countrycodes"></a>38.3.2. Country Codes</h3></div></div></div>
<p>
            By default, <code class="code">Zend_Service_Amazon</code> connects to the United States ("<code class="code">US</code>") Amazon
            web service. To connect from a different country, simply specify the appropriate country code string
            as the second parameter to the constructor:
        </p>
<div class="example">
<a name="zend.service.amazon.countrycodes.example.country_code"></a><p class="title"><b>Example 38.6. Choosing an Amazon Web Service Country</b></p>
<div class="example-contents"><pre class="programlisting">&lt;?php
// Connect to Amazon in Japan
require_once 'Zend/Service/Amazon.php';
$amazon = new Zend_Service_Amazon('AMAZON_API_KEY', 'JP');
            </pre></div>
</div>
<br class="example-break"><div class="note"><table border="0" summary="Note: Country codes">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
<th align="left">Country codes</th>
</tr>
<tr><td align="left" valign="top"><p>
                Valid country codes are: <code class="code">CA</code>, <code class="code">DE</code>, <code class="code">FR</code>, <code class="code">JP</code>,
                <code class="code">UK</code>, and <code class="code">US</code>.
            </p></td></tr>
</table></div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.service.amazon.itemlookup"></a>38.3.3. Looking up a Specific Amazon Item by ASIN</h3></div></div></div>
<p>
            The <code class="code">itemLookup()</code> method provides the ability to fetch a particular Amazon item when
            the ASIN is known.
        </p>
<div class="example">
<a name="zend.service.amazon.itemlookup.example.asin"></a><p class="title"><b>Example 38.7. Looking up a Specific Amazon Item by ASIN</b></p>
<div class="example-contents"><pre class="programlisting">&lt;?php
require_once 'Zend/Service/Amazon.php';
$amazon = new Zend_Service_Amazon('AMAZON_API_KEY');
$item = $amazon-&gt;itemLookup('B0000A432X');
            </pre></div>
</div>
<br class="example-break"><p>
            The <code class="code">itemLookup()</code> method also accepts an optional second parameter for handling search
            options. For full details, including a list of available options, please see the
            <a href="http://www.amazon.com/gp/aws/sdk/main.html/103-9285448-4703844?s=AWSEcommerceService&amp;v=2005-10-05&amp;p=ApiReference/ItemLookupOperation" target="_top">relevant Amazon documentation</a>.
        </p>
<div class="note"><table border="0" summary="Note: Image information">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
<th align="left">Image information</th>
</tr>
<tr><td align="left" valign="top"><p>
                To retrieve images information for your search results, you must set
                <code class="code">ResponseGroup</code> option to <code class="code">Medium</code> or <code class="code">Large</code>.
            </p></td></tr>
</table></div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.service.amazon.itemsearch"></a>38.3.4. Performing Amazon Item Searches</h3></div></div></div>
<p>
            Searching for items based on any of various available criteria are made simple using the
            <code class="code">itemSearch()</code> method, as in the following example:
        </p>
<div class="example">
<a name="zend.service.amazon.itemsearch.example.basic"></a><p class="title"><b>Example 38.8. Performing Amazon Item Searches</b></p>
<div class="example-contents"><pre class="programlisting">&lt;?php
require_once 'Zend/Service/Amazon.php';
$amazon = new Zend_Service_Amazon('AMAZON_API_KEY');
$results = $amazon-&gt;itemSearch(array('SearchIndex' =&gt; 'Books', 'Keywords' =&gt; 'php'));
foreach ($results as $result) {
    echo $result-&gt;Title . '&lt;br /&gt;';
}
            </pre></div>
</div>
<br class="example-break"><div class="example">
<a name="zend.service.amazon.itemsearch.example.responsegroup"></a><p class="title"><b>Example 38.9. Using the <code class="code">ResponseGroup</code> Option</b></p>
<div class="example-contents">
<p>
                The <code class="code">ResponseGroup</code> option is used to control the specific information that will be returned
                in the response.
            </p>
<pre class="programlisting">&lt;?php
require_once 'Zend/Service/Amazon.php';
$amazon = new Zend_Service_Amazon('AMAZON_API_KEY');
$results = $amazon-&gt;itemSearch(array(
    'SearchIndex'   =&gt; 'Books',
    'Keywords'      =&gt; 'php',
    'ResponseGroup' =&gt; 'Small,ItemAttributes,Images,SalesRank,Reviews,EditorialReview,Similarities,ListmaniaLists'
    ));
foreach ($results as $result) {
    echo $result-&gt;Title . '&lt;br /&gt;';
}
            </pre>
</div>
</div>
<br class="example-break"><p>
            The <code class="code">itemSearch()</code> method accepts a single array parameter for handling search
            options. For full details, including a list of available options, please see the
            <a href="http://www.amazon.com/gp/aws/sdk/main.html/103-9285448-4703844?s=AWSEcommerceService&amp;v=2005-10-05&amp;p=ApiReference/ItemSearchOperation" target="_top">relevant Amazon documentation</a>
        </p>
<div class="tip"><table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td>
<th align="left">Tip</th>
</tr>
<tr><td align="left" valign="top"><p>
                The <a href="zend.service.amazon.html#zend.service.amazon.query" title="38.3.5. Using the Alternative Query API"><code class="code">Zend_Service_Amazon_Query</code></a> class
                is an easy to use wrapper around this method.
            </p></td></tr>
</table></div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.service.amazon.query"></a>38.3.5. Using the Alternative Query API</h3></div></div></div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.query.introduction"></a>38.3.5.1. Introduction</h4></div></div></div>
<p>
                <code class="code">Zend_Service_Amazon_Query</code> provides an alternative API for using the Amazon Web Service.
                The alternative API uses the Fluent Interface pattern. That is, all calls can be made using chained method
                calls. (e.g., <code class="code">$obj-&gt;method()-&gt;method2($arg)</code>)
            </p>
<p>
                The <code class="code">Zend_Service_Amazon_Query</code> API uses overloading to easily set up an item search and then
                allows you to search based upon the criteria specified. Each of the options is provided as a method call,
                and each method's argument corresponds to the named option's value:
            </p>
<div class="example">
<a name="zend.service.amazon.query.introduction.example.basic"></a><p class="title"><b>Example 38.10. Search Amazon Using the Alternative Query API</b></p>
<div class="example-contents">
<p>
                    In this example, the alternative query API is used as a fluent interface to specify options and their
                    respective values:
                </p>
<pre class="programlisting">&lt;?php
require_once 'Zend/Service/Amazon/Query.php';
$query = new Zend_Service_Amazon_Query('MY_API_KEY');
$query-&gt;Category('Books')-&gt;Keywords('PHP');
$results = $query-&gt;search();
foreach ($results as $result) {
    echo $result-&gt;Title . '&lt;br /&gt;';
}
                </pre>
<p>
                    This sets the option <code class="code">Category</code> to "Books" and <code class="code">Keywords</code> to "PHP".
                </p>
<p>
                    For more information on the available options, please refer to the
                    <a href="http://www.amazon.com/gp/aws/sdk/main.html/102-9041115-9057709?s=AWSEcommerceService&amp;v=2005-10-05&amp;p=ApiReference/ItemSearchOperation" target="_top">relevant Amazon documentation</a>.
                </p>
</div>
</div>
<br class="example-break">
</div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.service.amazon.classes"></a>38.3.6. Zend_Service_Amazon Classes</h3></div></div></div>
<p>
            The following classes are all returned by
            <a href="zend.service.amazon.html#zend.service.amazon.itemlookup" title="38.3.3. Looking up a Specific Amazon Item by ASIN"><code class="code">Zend_Service_Amazon::itemLookup()</code></a>
            and
            <a href="zend.service.amazon.html#zend.service.amazon.itemsearch" title="38.3.4. Performing Amazon Item Searches"><code class="code">Zend_Service_Amazon::itemSearch()</code></a>:
            </p>
<div class="itemizedlist"><ul type="disc">
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.item" title="38.3.6.1. Zend_Service_Amazon_Item"><code class="code">Zend_Service_Amazon_Item</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.image" title="38.3.6.2. Zend_Service_Amazon_Image"><code class="code">Zend_Service_Amazon_Image</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.resultset" title="38.3.6.3. Zend_Service_Amazon_ResultSet"><code class="code">Zend_Service_Amazon_ResultSet</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.offerset" title="38.3.6.4. Zend_Service_Amazon_OfferSet"><code class="code">Zend_Service_Amazon_OfferSet</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.offer" title="38.3.6.5. Zend_Service_Amazon_Offer"><code class="code">Zend_Service_Amazon_Offer</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.similarproduct" title="38.3.6.6. Zend_Service_Amazon_SimilarProduct"><code class="code">Zend_Service_Amazon_SimilarProduct</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.accessories" title="38.3.6.7. Zend_Service_Amazon_Accessories"><code class="code">Zend_Service_Amazon_Accessories</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.customerreview" title="38.3.6.8. Zend_Service_Amazon_CustomerReview"><code class="code">Zend_Service_Amazon_CustomerReview</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.editorialreview" title="38.3.6.9. Zend_Service_Amazon_EditorialReview"><code class="code">Zend_Service_Amazon_EditorialReview</code></a></p></li>
<li><p><a href="zend.service.amazon.html#zend.service.amazon.classes.listmania" title="38.3.6.10. Zend_Service_Amazon_Listmania"><code class="code">Zend_Service_Amazon_ListMania</code></a></p></li>
</ul></div>
<p>
        </p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.item"></a>38.3.6.1. Zend_Service_Amazon_Item</h4></div></div></div>
<p>
                <code class="code">Zend_Service_Amazon_Item</code> is the class type used to represent an Amazon item returned by the
                web service. It encompasses all of the items attributes, including title, description, reviews, etc.
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.item.asxml"></a>38.3.6.1.1. Zend_Service_Amazon_Item::asXML()</h5></div></div></div>
<p>
                    <code class="methodsynopsis"><span class="type">string </span><span class="methodname">asXML</span>();</code>
                </p>
<p>Return the original XML for the item</p>
</div>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.item.properties"></a>38.3.6.1.2. Properties</h5></div></div></div>
<p>
                    <code class="code">Zend_Service_Amazon_Item</code> has a number of properties directly related to their standard
                    Amazon API counterparts.
                </p>
<div class="table">
<a name="zend.service.amazon.classes.item.properties.table-1"></a><p class="title"><b>Table 38.1. Zend_Service_Amazon_Item Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_Item Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>ASIN</td>
<td>string</td>
<td>Amazon Item ID</td>
</tr>
<tr>
<td>DetailPageURL</td>
<td>string</td>
<td>URL to the Items Details Page</td>
</tr>
<tr>
<td>SalesRank</td>
<td>int</td>
<td>Sales Rank for the Item</td>
</tr>
<tr>
<td>SmallImage</td>
<td>Zend_Service_Amazon_Image</td>
<td>Small Image of the Item</td>
</tr>
<tr>
<td>MediumImage</td>
<td>Zend_Service_Amazon_Image</td>
<td>Medium Image of the Item</td>
</tr>
<tr>
<td>LargeImage</td>
<td>Zend_Service_Amazon_Image</td>
<td>Large Image of the Item</td>
</tr>
<tr>
<td>Subjects</td>
<td>array</td>
<td>Item Subjects</td>
</tr>
<tr>
<td>Offers</td>
<td>
                                    <code class="code">
                                        <a href="zend.service.amazon.html#zend.service.amazon.classes.offerset" title="38.3.6.4. Zend_Service_Amazon_OfferSet">Zend_Service_Amazon_OfferSet</a>
                                    </code>
                                </td>
<td>Offer Summary and Offers for the Item</td>
</tr>
<tr>
<td>CustomerReviews</td>
<td>array</td>
<td>
                                    Customer reviews represented as an array of
                                    <code class="code">
                                        <a href="zend.service.amazon.html#zend.service.amazon.classes.customerreview" title="38.3.6.8. Zend_Service_Amazon_CustomerReview">Zend_Service_Amazon_CustomerReview</a>
                                    </code>
                                    objects
                                </td>
</tr>
<tr>
<td>EditorialReviews</td>
<td>array</td>
<td>
                                    Editorial reviews represented as an array of
                                    <code class="code">
                                        <a href="zend.service.amazon.html#zend.service.amazon.classes.editorialreview" title="38.3.6.9. Zend_Service_Amazon_EditorialReview">Zend_Service_Amazon_EditorialReview</a>
                                    </code>
                                    objects
                                </td>
</tr>
<tr>
<td>SimilarProducts</td>
<td>array</td>
<td>
                                    Similar Products represented as an array of
                                    <code class="code">
                                        <a href="zend.service.amazon.html#zend.service.amazon.classes.similarproduct" title="38.3.6.6. Zend_Service_Amazon_SimilarProduct">Zend_Service_Amazon_SimilarProduct</a>
                                    </code>
                                    objects
                                </td>
</tr>
<tr>
<td>Accessories</td>
<td>array</td>
<td>
                                    Accessories for the item represented as an array of
                                    <code class="code">
                                        <a href="zend.service.amazon.html#zend.service.amazon.classes.accessories" title="38.3.6.7. Zend_Service_Amazon_Accessories">Zend_Service_Amazon_Accessories</a>
                                    </code>
                                    objects
                                </td>
</tr>
<tr>
<td>Tracks</td>
<td>array</td>
<td>An array of track numbers and names for Music CDs and DVDs</td>
</tr>
<tr>
<td>ListmaniaLists</td>
<td>array</td>
<td>
                                    Item related Listmania Lists as an array of
                                    <code class="code">
                                        <a href="zend.service.amazon.html#zend.service.amazon.classes.listmania" title="38.3.6.10. Zend_Service_Amazon_Listmania">Zend_Service_Amazon_ListmainList</a>
                                    </code>
                                    objects
                                </td>
</tr>
<tr>
<td>PromotionalTag</td>
<td>string</td>
<td>Item Promotional Tag</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.image"></a>38.3.6.2. Zend_Service_Amazon_Image</h4></div></div></div>
<p><code class="code">Zend_Service_Amazon_Image</code> represents a remote Image for a product.</p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.image.properties"></a>38.3.6.2.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.image.properties.table-1"></a><p class="title"><b>Table 38.2. Zend_Service_Amazon_Image Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_Image Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>Url</td>
<td>Zend_Uri</td>
<td>Remote URL for the Image</td>
</tr>
<tr>
<td>Height</td>
<td>int</td>
<td>The Height of the image in pixels</td>
</tr>
<tr>
<td>Width</td>
<td>int</td>
<td>The Width of the image in pixels</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.resultset"></a>38.3.6.3. Zend_Service_Amazon_ResultSet</h4></div></div></div>
<p>
                <code class="code">Zend_Service_Amazon_ResultSet</code> objects are returned by
                <a href="zend.service.amazon.html#zend.service.amazon.itemsearch" title="38.3.4. Performing Amazon Item Searches">Zend_Service_Amazon::itemSearch()</a>
                and allow you to easily handle the multiple results returned.
            </p>
<div class="note"><table border="0" summary="Note: SeekableIterator">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
<th align="left">SeekableIterator</th>
</tr>
<tr><td align="left" valign="top"><p>
                    Implements the <code class="code">SeekableIterator</code> for easy iteration (e.g. using <code class="code">foreach</code>), as
                    well as direct access to a specific result using <code class="code">seek()</code>.
                </p></td></tr>
</table></div>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.resultset.totalresults"></a>38.3.6.3.1. Zend_Service_Amazon_ResultSet::totalResults()</h5></div></div></div>
<code class="methodsynopsis"><span class="type">int </span><span class="methodname">totalResults</span>();</code><p>Returns the total number of results returned by the search</p>
<p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.offerset"></a>38.3.6.4. Zend_Service_Amazon_OfferSet</h4></div></div></div>
<p>
                Each result returned by
                <a href="zend.service.amazon.html#zend.service.amazon.itemsearch" title="38.3.4. Performing Amazon Item Searches">Zend_Service_Amazon::itemSearch()</a>
                and
                <a href="zend.service.amazon.html#zend.service.amazon.itemlookup" title="38.3.3. Looking up a Specific Amazon Item by ASIN">Zend_Service_Amazon::itemLookup()</a>
                contains a
                <code class="code">Zend_Service_Amazon_OfferSet</code>
                object through which pricing information for the item can be retrieved.
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.offerset.parameters"></a>38.3.6.4.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.offerset.parameters.table-1"></a><p class="title"><b>Table 38.3. Zend_Service_Amazon_OfferSet Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_OfferSet Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>LowestNewPrice</td>
<td>int</td>
<td>Lowest Price for the item in "New" condition</td>
</tr>
<tr>
<td>LowestNewPriceCurrency</td>
<td>string</td>
<td>
                                    The currency for the
                                    <code class="code">LowestNewPrice</code>
                                </td>
</tr>
<tr>
<td>LowestOldPrice</td>
<td>int</td>
<td>Lowest Price for the item in "Used" condition</td>
</tr>
<tr>
<td>LowestOldPriceCurrency</td>
<td>string</td>
<td>
                                    The currency for the
                                    <code class="code">LowestOldPrice</code>
                                </td>
</tr>
<tr>
<td>TotalNew</td>
<td>int</td>
<td>Total number of "new" condition available for the item</td>
</tr>
<tr>
<td>TotalUsed</td>
<td>int</td>
<td>Total number of "used" condition available for the item</td>
</tr>
<tr>
<td>TotalCollectible</td>
<td>int</td>
<td>Total number of "collectible" condition available for the item</td>
</tr>
<tr>
<td>TotalRefurbished</td>
<td>int</td>
<td>Total number of "refurbished" condition available for the item</td>
</tr>
<tr>
<td>Offers</td>
<td>array</td>
<td>
                                    An array of
                                    <code class="code">Zend_Service_Amazon_Offer</code>
                                    objects.
                                </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.offer"></a>38.3.6.5. Zend_Service_Amazon_Offer</h4></div></div></div>
<p>
                Each offer for an item is returned as an
                <code class="code">Zend_Service_Amazon_Offer</code>
                object.
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.offer.properties"></a>38.3.6.5.1. Zend_Service_Amazon_Offer Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.offer.properties.table-1"></a><p class="title"><b>Table 38.4. Properties</b></p>
<div class="table-contents"><table summary="Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>MerchantId</td>
<td>string</td>
<td>Merchants Amazon ID</td>
</tr>
<tr>
<td>GlancePage</td>
<td>string</td>
<td>URL for a page with a summary of the Merchant</td>
</tr>
<tr>
<td>Condition</td>
<td>string</td>
<td>Condition of the item</td>
</tr>
<tr>
<td>OfferListingId</td>
<td>string</td>
<td>ID of the Offer Listing</td>
</tr>
<tr>
<td>Price</td>
<td>int</td>
<td>Price for the item</td>
</tr>
<tr>
<td>CurrencyCode</td>
<td>string</td>
<td>Currency Code for the price of the item</td>
</tr>
<tr>
<td>Availability</td>
<td>string</td>
<td>Availability of the item</td>
</tr>
<tr>
<td>IsEligibleForSuperSaverShipping</td>
<td>boolean</td>
<td>Whether the item is eligible for Super Saver Shipping or not</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.similarproduct"></a>38.3.6.6. Zend_Service_Amazon_SimilarProduct</h4></div></div></div>
<p>
                When searching for items, Amazon also returns a list of similar products that the searcher may find to
                their liking. Each of these is returned as a <code class="code">Zend_Service_Amazon_SimilarProduct</code> object.
            </p>
<p>
                Each object contains the information to allow you to make sub-sequent requests to get the full information
                on the item.
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.similarproduct.properties"></a>38.3.6.6.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.similarproduct.properties.table-1"></a><p class="title"><b>Table 38.5. Zend_Service_Amazon_SimilarProduct Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_SimilarProduct Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>ASIN</td>
<td>string</td>
<td>Products Amazon Unique ID (ASIN)</td>
</tr>
<tr>
<td>Title</td>
<td>string</td>
<td>Products Title</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.accessories"></a>38.3.6.7. Zend_Service_Amazon_Accessories</h4></div></div></div>
<p>
                Accessories for the returned item are represented as <code class="code">Zend_Service_Amazon_Accessories</code> objects
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.accessories.properties"></a>38.3.6.7.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.accessories.properties.table-1"></a><p class="title"><b>Table 38.6. Zend_Service_Amazon_Accessories Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_Accessories Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>ASIN</td>
<td>string</td>
<td>Products Amazon Unique ID (ASIN)</td>
</tr>
<tr>
<td>Title</td>
<td>string</td>
<td>Products Title</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.customerreview"></a>38.3.6.8. Zend_Service_Amazon_CustomerReview</h4></div></div></div>
<p>
                Each Customer Review is returned as a <code class="code">Zend_Service_Amazon_CustomerReview</code> object.
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.customerreview.properties"></a>38.3.6.8.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.customerreview.properties.table-1"></a><p class="title"><b>Table 38.7. Zend_Service_Amazon_CustomerReview Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_CustomerReview Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>Rating</td>
<td>string</td>
<td>Item Rating</td>
</tr>
<tr>
<td>HelpfulVotes</td>
<td>string</td>
<td>Votes on how helpful the review is</td>
</tr>
<tr>
<td>CustomerId</td>
<td>string</td>
<td>Customer ID</td>
</tr>
<tr>
<td>TotalVotes</td>
<td>string</td>
<td>Total Votes</td>
</tr>
<tr>
<td>Date</td>
<td>string</td>
<td>Date of the Review</td>
</tr>
<tr>
<td>Summary</td>
<td>string</td>
<td>Review Summary</td>
</tr>
<tr>
<td>Content</td>
<td>string</td>
<td>Review Content</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.editorialreview"></a>38.3.6.9. Zend_Service_Amazon_EditorialReview</h4></div></div></div>
<p>
                Each items Editorial Reviews are returned as a <code class="code">Zend_Service_Amazon_EditorialReview</code> object
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.editorialreview.properties"></a>38.3.6.9.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.editorialreview.properties.table-1"></a><p class="title"><b>Table 38.8. Zend_Service_Amazon_EditorialReview Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_EditorialReview Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>Source</td>
<td>string</td>
<td>Source of the Editorial Review</td>
</tr>
<tr>
<td>Content</td>
<td>string</td>
<td>Review Content</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="zend.service.amazon.classes.listmania"></a>38.3.6.10. Zend_Service_Amazon_Listmania</h4></div></div></div>
<p>
                Each results List Mania List items are returned as <code class="code">Zend_Service_Amazon_Listmania</code> objects.
            </p>
<div class="sect4" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="zend.service.amazon.classes.listmania.properties"></a>38.3.6.10.1. Properties</h5></div></div></div>
<div class="table">
<a name="zend.service.amazon.classes.listmania.properties.table-1"></a><p class="title"><b>Table 38.9. Zend_Service_Amazon_Listmania Properties</b></p>
<div class="table-contents"><table summary="Zend_Service_Amazon_Listmania Properties" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>ListId</td>
<td>string</td>
<td>List ID</td>
</tr>
<tr>
<td>ListName</td>
<td>string</td>
<td>List Name</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
                    <a href="zend.service.amazon.html#zend.service.amazon.classes" title="38.3.6. Zend_Service_Amazon Classes">Back to Class List</a>
                </p>
</div>
</div>
</div>
</div>
<div class="navfooter"><table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="zend.service.akismet.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="zend.service.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="zend.service.audioscrobbler.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">38.2. Zend_Service_Akismet </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> 38.4. Zend_Service_Audioscrobbler</td>
</tr>
</table></div>
<div class="revinfo"></div>
</body>
</html>
